﻿<UserControl x:Class="frmCRMMainDisplay"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
     Height="823" Width="1064" Background="Gray">
    <Grid>
        <Label Height="21" HorizontalAlignment="Left" Margin="4,9,0,0" Name="Label1" VerticalAlignment="Top" Width="58">Individual</Label>
        <TextBox Height="20" HorizontalAlignment="Left" Margin="65,9,0,0" Name="lblCandidateName" VerticalAlignment="Top" Width="234" BorderBrush="Black" />
        <TextBox Height="40" HorizontalAlignment="Left" Margin="368,4,0,0" Name="lblPrivateMessage" VerticalAlignment="Top" Width="113" TextAlignment="Center" TextWrapping="Wrap" Background="Gray" BorderBrush="Transparent">Private Individual no Associated Company</TextBox>
        <TextBox Height="20" HorizontalAlignment="Left" Margin="65,32,0,0" Name="lblCandidateID" VerticalAlignment="Top" Width="85" BorderBrush="Black" />
        <GroupBox Header="Go To" Height="73" HorizontalAlignment="Right" Margin="0,4,232,0" Name="grpGoTo" VerticalAlignment="Top" Width="203">
            <Grid>
                <RadioButton Margin="6,5,0,0" Name="radGotoCompany" Height="15.8" VerticalAlignment="Top" HorizontalAlignment="Left" Width="62">Company</RadioButton>
                <RadioButton Height="15.8" Margin="73,5,66,0" Name="radGotoPerson" VerticalAlignment="Top">Person</RadioButton>
                <RadioButton Height="15.8" HorizontalAlignment="Right" Margin="0,5,8,0" Name="radGotoCase" VerticalAlignment="Top" Width="52" IsChecked="True">Case</RadioButton>
                <TextBox BorderBrush="Black" HorizontalAlignment="Left" Margin="6,0,0,3" Name="txtGoto" Width="85" Height="20" VerticalAlignment="Bottom" />
                <Button HorizontalAlignment="Right" Margin="0,0,19,2" Name="btnGoTo" Width="75" Height="22.8" VerticalAlignment="Bottom" IsDefault="True">Go</Button>
            </Grid>
        </GroupBox>
        <Button Height="22.8" HorizontalAlignment="Right" Margin="0,12,117,0" Name="btnSearch" VerticalAlignment="Top" Width="75">Search</Button>
        <Button Height="22.8" HorizontalAlignment="Right" Margin="0,12,27,0" Name="btnClose" VerticalAlignment="Top" Width="75">Close</Button>
        <Button Height="23" Margin="356.5,38,0,0" Name="btnAddtoCompany" VerticalAlignment="Top" Width="156" HorizontalAlignment="Left">Add this Person to Company</Button>
        <TabControl Margin="25,87,57,68" Name="TabControl1" Background="Gray" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">

            <TabItem Header="Company" Name="tabCompany">
                <Grid >                   
                    <GroupBox Header="Company Details" Height="560" Name="GroupBox1" Margin="5,3,449,0" VerticalAlignment="Top">
                        <Grid>
                            <Label HorizontalAlignment="Left" Margin="4,5,0,0" Name="Label2" Width="44" Height="21" VerticalAlignment="Top">Name</Label>

                            <GroupBox Header="Subsidiaries" Margin="10,0,9,1" Name="GroupBox2" Height="177" VerticalAlignment="Bottom">
                                <Grid>
                                    <ListView  Margin="6" Name="lvwSubsidiary" Background="White" Height="147" Width="459">
                                        <ListView.View >
                                            <GridView Selector.IsSelected="true" >
                                                <GridView.Columns>
                                                    <GridViewColumn Width="150" Header="Company Name" DisplayMemberBinding="{Binding Path=company_name}" ></GridViewColumn>
                                                    <GridViewColumn Width="150" Header="Company Id" DisplayMemberBinding="{Binding Path=company_id}"></GridViewColumn>
                                                </GridView.Columns>
                                            </GridView>
                                        </ListView.View>
                                    </ListView>
                                </Grid>
                            </GroupBox>
                            <GroupBox Header="Parent Company" Margin="10,0,9,182" Name="grpParent" Height="49.8" VerticalAlignment="Bottom">
                                <Grid>
                                    <Label HorizontalAlignment="Left" Margin="-1,2.3,0,4.223" Name="lblParentCompId" Width="65" Background="White" BorderBrush="Black" BorderThickness="1" Grid.IsSharedSizeScope="True"></Label>
                                    <Label Margin="70,2.3,4,5.3" Name="lblParentCompName" Background="White" BorderBrush="Black" BorderThickness="1" Grid.IsSharedSizeScope="True" Height="23" Width="397"></Label>
                                </Grid>
                            </GroupBox>
                            <Label Height="21" HorizontalAlignment="Left" Margin="4,33,0,0" Name="Label3" VerticalAlignment="Top" Width="50">Industry</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="4,60,0,0" Name="Label4" VerticalAlignment="Top" Width="47">Size</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="4,89,0,0" Name="Label5" VerticalAlignment="Top" Width="50">Website</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="3,117,0,0" Name="Label6" VerticalAlignment="Top" Width="91">Account Manager</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="4,145,0,0" Name="Label7" VerticalAlignment="Top" Width="111">Default Case Worker</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="4,175,0,0" Name="Label8" VerticalAlignment="Top" Width="77">Account Type</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="4,204,0,0" Name="Label9" VerticalAlignment="Top" Width="58">Status</Label>
                            <Label HorizontalAlignment="Left" Margin="4,234,0,0" Name="Label11" Width="77" Height="20.8" VerticalAlignment="Top">Where Heard</Label>
                            <TextBox  BorderBrush="Black" Height="25" Margin="82,7,196,0" Name="lblCompanyName" VerticalAlignment="Top" Background="White" BorderThickness="1" IsReadOnly="True"></TextBox>
                            <Label BorderBrush="Black" Height="25" Margin="81,35,197,0" Name="lblIndustry" VerticalAlignment="Top" Background="White" BorderThickness="1" />
                            <Label BorderBrush="Black" Height="25" Margin="81,62,197,0" Name="lblCompanySize" VerticalAlignment="Top" Background="White" BorderThickness="1" />
                            <Label BorderBrush="Black" Height="25" Margin="81,91,231,0" Name="lblWebsite" VerticalAlignment="Top" Background="White" BorderThickness="1" />
                            <Label BorderBrush="Black" Height="25" Margin="116,119,196,0" Name="lblAccManager" VerticalAlignment="Top" Background="White" BorderThickness="1" />
                            <Label BorderBrush="Black" Height="25" Margin="118,147,194,0" Name="lblDefCW" VerticalAlignment="Top" Background="White" BorderThickness="1" />
                            <Label BorderBrush="Black" Height="25" Margin="118,177,194,0" Name="lblAccType" VerticalAlignment="Top" Background="White" BorderThickness="1" />
                            <Label  BorderBrush="Black" Height="25" Margin="118,206,194,0" Name="lblCompanyStatus" VerticalAlignment="Top" Background="White" BorderThickness="1" />
                            <Label BorderBrush="Black" Margin="118,236,194,0" Name="lblWhereHeard" Height="25" VerticalAlignment="Top" Background="White" BorderThickness="1" />
                            <Label Height="21" Margin="305,6,0,0" Name="Label10" VerticalAlignment="Top" HorizontalAlignment="Left" Width="74">Company ID</Label>
                            <Label Height="21" Margin="0,34,123,0" Name="Label12" VerticalAlignment="Top" HorizontalAlignment="Right" Width="74">Date Entered</Label>
                            <Label Height="23" Margin="0,61,131,0" Name="Label13" VerticalAlignment="Top" HorizontalAlignment="Right" Width="66">Entered By</Label>
                            <Label  BorderBrush="Black" Height="25" Margin="0,7,8,0" Name="lblCompanyID" VerticalAlignment="Top" HorizontalAlignment="Right" Width="110" Background="White" BorderThickness="1" />
                            <Label  BorderBrush="Black" Height="25" Margin="0,35,9,0" Name="lblDateEntered" VerticalAlignment="Top" HorizontalAlignment="Right" Width="110" Background="White" BorderThickness="1" />
                            <Label BorderBrush="Black" Height="25" Margin="0,62,9,0" Name="lblEnteredBy" VerticalAlignment="Top" HorizontalAlignment="Right" Width="110" Background="White" BorderThickness="1" />
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,90,196,0" Name="btnWeb" VerticalAlignment="Top" Width="30">Web</Button>
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,115,6,0" Name="btnEditCompany" VerticalAlignment="Top" Width="143">Edit Details</Button>
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,144,6,0" Name="btnAddCompEvent" VerticalAlignment="Top" Width="143">Add Event to Company</Button>
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,176,7,0" Name="btnCompanyEvents" VerticalAlignment="Top" Width="143">View Events for Company</Button>
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,205,7,0" Name="btnCompanyAdverts" VerticalAlignment="Top" Width="143">View Company Adverts</Button>
                            <Button HorizontalAlignment="Right" Margin="0,235,7,0" Name="btnEditSLA" Width="143" Height="22.8" VerticalAlignment="Top">View Edit SLA Charges</Button>
                            <Button HorizontalAlignment="Right" Margin="0,0,8,245" Name="btnRemoveSubsid" Width="143" Height="22.8" VerticalAlignment="Bottom">Remove Subsidiary</Button>
                            <Button Height="23" HorizontalAlignment="Left" Margin="12,0,0,244" Name="btnAddSubsidiary" VerticalAlignment="Bottom" Width="143">Add Subsidiary Company</Button>
                            <Button Height="22.8" Margin="179,0,180,244" Name="btnSetParentCompany" VerticalAlignment="Bottom">Set Parent Company</Button>
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="Contact Details" Margin="0,2,15,74.8" Name="GroupBox3" HorizontalAlignment="Right" Width="420">
                        <Grid>
                            <ListView  Height="133" Margin="6,7,-4,0" Name="lvwContacts" VerticalAlignment="Top" Background="White" >
                                <ListView.View >
                                    <GridView Selector.IsSelected="true" >
                                        <GridView.Columns>
                                            <GridViewColumn Width="150" Header="Contact Id" DisplayMemberBinding="{Binding Path=Person_ID}" ></GridViewColumn>
                                            <GridViewColumn Width="150" Header="Contact Name" DisplayMemberBinding="{Binding Path=Name}"></GridViewColumn>
                                            <GridViewColumn Width="150" Header="Role" DisplayMemberBinding="{Binding Path=Role_Name}"></GridViewColumn>

                                        </GridView.Columns>
                                    </GridView>
                                </ListView.View>
                            </ListView>
                            <GroupBox Header="Company Addresses" Margin="4,187,4,10.8" Name="GroupBox4">
                                <Grid>
                                    <ListView  Height="172" Margin="11,6.8,7,0" Name="lvwCoAddresses" VerticalAlignment="Top" Background="White" Width="389" >
                                        <ListView.View >
                                            <GridView Selector.IsSelected="true" >
                                                <GridView.Columns>
                                                    <GridViewColumn Width="150" Header="Name" DisplayMemberBinding="{Binding Path=AddressLink_Name}" ></GridViewColumn>
                                                    <GridViewColumn Width="50" Header="Type" DisplayMemberBinding="{Binding Path=Type}"></GridViewColumn>
                                                    <GridViewColumn Width="150" Header="First Line" DisplayMemberBinding="{Binding Path=FirstLine}"></GridViewColumn>

                                                </GridView.Columns>
                                            </GridView>
                                        </ListView.View>
                                    </ListView>
                                    <Label Height="112" HorizontalAlignment="Left" Margin="14,0,0,11" Name="lblCoAddressFull" VerticalAlignment="Bottom" Width="172" Background="White"></Label>
                                    <Button Height="23" Margin="191,0,97,63" Name="btnEditCoAddress" VerticalAlignment="Bottom">Edit</Button>
                                    <Button Height="23" Margin="191,0,97,25" Name="btnDelCoAddress" VerticalAlignment="Bottom">Delete</Button>
                                    <Button Height="22.8" Margin="191,0,97,100" Name="btnAddCoAddress" VerticalAlignment="Bottom">Add New Address</Button>
                                    <Button Height="23" HorizontalAlignment="Right" Margin="0,0,8,100" Name="btnCoInvAddress" VerticalAlignment="Bottom" Width="83">Add Invoice</Button>
                                    <Button HorizontalAlignment="Right" Margin="0,229.57,8,25" Name="btnCoCorrAddress" Width="83" HorizontalContentAlignment="Left">Correspondence Address</Button>
                                </Grid>
                            </GroupBox>
                            <Button Height="22.8" HorizontalAlignment="Right" Margin="0,146,6,0" Name="btnAddPersToComp" VerticalAlignment="Top" Width="145">Add Person to Company</Button>
                        </Grid>
                    </GroupBox>
                </Grid>
            </TabItem>
            <TabItem Header="People" Name="tabPeople">
                <Grid >
                    <GroupBox Header="Personal" Margin="4,1,452,-5" Name="grpPersonal">
                        <Grid>
                            <Label Height="21" HorizontalAlignment="Left" Margin="3,5,0,0" Name="Label14" VerticalAlignment="Top" Width="44">Name</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="3,30,0,0" Name="Label17" VerticalAlignment="Top" Width="50">Id</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="3,99,0,0" Name="Label18" VerticalAlignment="Top" Width="58">Job Title</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="2,122,0,0" Name="Label19" VerticalAlignment="Top" Width="50">Qual</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="3,145,0,0" Name="Label20" VerticalAlignment="Top" Width="43">Salary</Label>
                            <TextBox BorderBrush="Black" Height="20" HorizontalAlignment="Left" Margin="68,31,0,0" Name="lblCandidateId3" VerticalAlignment="Top" Width="85" />
                            <Button Height="34" Margin="0,56,220,0" Name="btnEditPerson" VerticalAlignment="Top" HorizontalAlignment="Right" Width="90">Edit Details</Button>
                            <Button Height="34" HorizontalAlignment="Left" Margin="8,56,0,0" Name="btnAddEventPerson" VerticalAlignment="Top" Width="90">
                                <TextBlock TextWrapping="Wrap">Add Event to Person</TextBlock>
                            </Button>
                            <Button Height="34" Margin="100,56,0,0" Name="btnViewEventPerson" VerticalAlignment="Top" HorizontalAlignment="Left" Width="90">
                                <TextBlock TextWrapping="Wrap"> View Events for Person</TextBlock></Button>
                            <TextBox BorderBrush="Black" Height="20" Margin="68,99,228,0" Name="lblPersonJob" VerticalAlignment="Top" />
                            <TextBox BorderBrush="Black" Height="20" Margin="68,123,228,0" Name="lblPersonQualification" VerticalAlignment="Top" />
                            <TextBox BorderBrush="Black" Height="20" HorizontalAlignment="Left" Margin="68,146,0,0" Name="lblPersonSalary" VerticalAlignment="Top" Width="85" />
                            <TextBox BorderBrush="Black" Height="20" Margin="68,5,228,0" Name="lblCandidateName3" VerticalAlignment="Top" />
                            <Label Height="21" HorizontalAlignment="Left" Margin="156,146,0,0" Name="Label28" VerticalAlignment="Top" Width="31">DOB</Label>
                            <TextBox BorderBrush="Black" Height="20" Margin="189,147,228,0" Name="lblPersonDOB" VerticalAlignment="Top" />
                            <Label Height="23" HorizontalAlignment="Left" Margin="156,169,0,0" Name="Label29" VerticalAlignment="Top" Width="31">Age</Label>
                            <TextBox BorderBrush="Black" Height="20" Margin="189,170,228,0" Name="lblPersonAge" VerticalAlignment="Top" />
                            <Label Height="21" HorizontalAlignment="Left" Margin="2,194,0,0" Name="lblSkillOccLbl" VerticalAlignment="Top" Width="62">Skilled Occ</Label>
                            <TextBox BorderBrush="Black" Height="20" Margin="68,194,228,0" Name="lblSkillOcc" VerticalAlignment="Top" />
                            <GroupBox Header="Passport" Height="45" Margin="2,215,222,0" Name="grpPassport" VerticalAlignment="Top">
                                <Grid>
                                    <Label HorizontalAlignment="Left" Margin="-4,2,0,3" Name="Label15" Width="48" Height="24">Number</Label>
                                    <TextBox BorderBrush="Black" Margin="45,5.8,132,0" Name="lblPersonPassportNo" Width="90" />
                                    <Label Margin="0,2,91,0" Name="Label16" HorizontalAlignment="Right" Width="39" Height="24">Expiry</Label>
                                    <TextBox BorderBrush="Black" Margin="0,5.8,0,0" Name="lblPersonPassportExp" HorizontalAlignment="Right" Width="85" />
                                    <GroupBox Header="Status" Margin="-6,0,-6,-154" Name="grpPersonStatus" Height="147" VerticalAlignment="Bottom">
                                        <Grid>
                                            <Label Height="21" HorizontalAlignment="Left" Margin="-1,3,0,0" Name="Label21" VerticalAlignment="Top" Width="64">Destination</Label>
                                            <Label Height="21" HorizontalAlignment="Left" Margin="1,29,0,0" Name="Label22" VerticalAlignment="Top" Width="50">Nat</Label>
                                            <TextBox BorderBrush="Black" Height="21" Margin="65,3,-1,0" Name="lblPersonDest" VerticalAlignment="Top" />
                                            <TextBox BorderBrush="Black" Height="21" Margin="65,29,-1,0" Name="lblPersonNat" VerticalAlignment="Top" />
                                            <Label HorizontalAlignment="Left" Margin="0,53,0,51" Name="Label23" Width="60">Residence</Label>
                                            <Label Height="23.8" HorizontalAlignment="Left" Margin="1,0,0,25" Name="Label24" VerticalAlignment="Bottom" Width="50">UK Visa</Label>
                                            <TextBox BorderBrush="Black" Margin="65,54,-1,53" Name="lblPersonRes" />
                                            <TextBox BorderBrush="Black" Height="21" Margin="65,0,-1,28" Name="lblPersonUKVisa" VerticalAlignment="Bottom" />
                                            <Label Height="21" HorizontalAlignment="Left" Margin="-1,0,0,2" Name="Label25" VerticalAlignment="Bottom" Width="64">Visa Expiry</Label>
                                            <TextBox BorderBrush="Black" Height="21" Margin="65,0,120,2" Name="lblPersonVisaExp" VerticalAlignment="Bottom" />
                                        </Grid>
                                    </GroupBox>
                                </Grid>
                            </GroupBox>
                            <Label Height="21" HorizontalAlignment="Left" Margin="2,0,0,185" Name="Label33" VerticalAlignment="Bottom" Width="74">Where Heard</Label>
                            <Label Height="23" Margin="78,0,224,185" Name="lblPersWhereHeard" VerticalAlignment="Bottom" BorderBrush="Black" BorderThickness="1" Background="White"></Label>
                            <GroupBox Header="Dependant of" Height="45" Margin="5,0,219,137" Name="grpDependantOf" VerticalAlignment="Bottom">
                                <Grid>
                                    <Label HorizontalAlignment="Left" Margin="0,3,0,0" Name="lblDependOfName" Width="111" Background="White" BorderBrush="Black" BorderThickness="1"></Label>
                                    <Label Margin="117,3,33,0" Name="lblDependOfId" Background="White" BorderBrush="Black" BorderThickness="1"></Label>
                                    <Button HorizontalAlignment="Left" Margin="239,4,0,-1" Name="btnGotoParent" Width="27"></Button>
                                    <GroupBox Header="Dependants" Margin="-6,0,-6,-69" Name="grpDependants" Height="61" VerticalAlignment="Bottom">
                                        <Grid>
                                            <Button Margin="2,3,0,15" Name="btnDepend" HorizontalAlignment="Left" Width="63">Add / Edit</Button>
                                            <ListView Margin="72,3,6,0" Name="lvwDepend" Background="White">

                                            </ListView >
                                        </Grid>
                                    </GroupBox>
                                    <GroupBox Header="View" Margin="-5,0,-175,-119" Name="grpRoleView" Height="44.8" VerticalAlignment="Bottom">
                                        <Grid>
                                            <RadioButton Margin="6,6,0,4" Name="radCoViewAll" HorizontalAlignment="Left" Width="33.5">All</RadioButton>
                                            <RadioButton HorizontalAlignment="Left" Margin="45,6,0,4" Name="radCoCandidates" Width="78.5">Candidates</RadioButton>
                                            <RadioButton HorizontalAlignment="Left" Margin="121,6,0,4" Name="radCoContacts" Width="78.5">Contacts</RadioButton>
                                            <RadioButton Margin="184.5,6,160,4" Name="radCoViewCat">By Category</RadioButton>
                                            <ComboBox HorizontalAlignment="Right" Margin="0,2,8,1" Name="drpRoles" Width="150" />
                                        </Grid>
                                    </GroupBox>
                                </Grid>
                            </GroupBox>
                            <ListView  HorizontalAlignment="Right" Margin="0,3,2,99" Name="lvwPeopleList" Width="216" Background="White" Visibility="Hidden">
                                <ListView.View >
                                    <GridView Selector.IsSelected="true" >
                                        <GridView.Columns>
                                            <GridViewColumn Width="80" Header="ID" DisplayMemberBinding="{Binding Path=Person_ID}" ></GridViewColumn>
                                            <GridViewColumn Width="50" Header="Name" DisplayMemberBinding="{Binding Path=Name}"></GridViewColumn>
                                            <GridViewColumn Width="50" Header="Role" DisplayMemberBinding="{Binding Path=Role_Name}"></GridViewColumn>

                                        </GridView.Columns>
                                    </GridView>
                                </ListView.View>
                            </ListView >
                            <Button Height="23" Margin="0,0,2,70" Name="btnAddPersToComp2" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="217">Add Person To Company</Button>
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="Contact Details" Margin="0,1,6,-5" Name="grpContact" HorizontalAlignment="Right" Width="439">
                        <Grid>
                            <ListView  Background="White" Height="139" Margin="2,46,70,0" Name="lvwPhoneNumbers" VerticalAlignment="Top">
                                <ListView.View >
                                    <GridView Selector.IsSelected="true" >
                                        <GridView.Columns>
                                            <GridViewColumn Width="100" Header="Name" DisplayMemberBinding="{Binding Path=phonenumber_name}"></GridViewColumn>
                                            <GridViewColumn Width="150" Header="Number" DisplayMemberBinding="{Binding Path=phonenumber_number}"></GridViewColumn>
                                            <GridViewColumn Width="100" Header="Type" DisplayMemberBinding="{Binding Path=Main}"></GridViewColumn>

                                        </GridView.Columns>
                                    </GridView>
                                </ListView.View>
                            </ListView >
                            <Button Height="23" Margin="70,2,0,0" Name="btnDataProtection" VerticalAlignment="Top" HorizontalAlignment="Left" Width="143" Visibility="Hidden">Data Protection Settings</Button>
                            <Button Height="22.8" Margin="0,2,47,0" Name="btnWebLogin" VerticalAlignment="Top" HorizontalAlignment="Right" Width="143">Create/Edit Web Login</Button>
                            <Label Height="21" HorizontalAlignment="Left" Margin="0,25,0,0" Name="Label26" VerticalAlignment="Top" Width="93">Phone Numbers</Label>
                            <Button Height="23" Margin="0,46,6,0" Name="btnAddPhone" VerticalAlignment="Top" Width="50" HorizontalAlignment="Right">Add</Button>
                            <Button Height="23" Margin="0,75,6,0" Name="btnEditPhone" VerticalAlignment="Top" Width="50" HorizontalAlignment="Right">Edit</Button>
                            <Button Margin="0,104.9,7,0" Name="btnMainPhone" Height="22.6" HorizontalAlignment="Right" VerticalAlignment="Top" Width="50">Main</Button>
                            <Button Height="23" Margin="0,134.5,7,0" Name="btnFaxPhone" VerticalAlignment="Top" HorizontalAlignment="Right" Width="50">Fax</Button>
                            <Button Height="22.8" Margin="0,163.7,7,0" Name="btnDeletePhone" VerticalAlignment="Top" HorizontalAlignment="Right" Width="50">Delete</Button>
                            <ListView  Background="White" Margin="3,209,69,258.6" Name="lvwEmailAddress" Height="139">
                                <ListView.View >
                                    <GridView Selector.IsSelected="true" >
                                        <GridView.Columns>
                                            <GridViewColumn Width="100" Header="Name" DisplayMemberBinding="{Binding Path=EMailAddress_Name}"></GridViewColumn>
                                            <GridViewColumn Width="150" Header="Email " DisplayMemberBinding="{Binding Path=EMailAddress_Address}"></GridViewColumn>
                                            <GridViewColumn Width="100" Header="Type " DisplayMemberBinding="{Binding Path=Main}"></GridViewColumn>

                                        </GridView.Columns>
                                    </GridView>
                                </ListView.View>
                            </ListView >
                            <Label Height="21" HorizontalAlignment="Left" Margin="1,188,0,0" Name="Label27" VerticalAlignment="Top" Width="93">Email Addresses</Label>
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,209,5,0" Name="btnAddEmail" VerticalAlignment="Top" Width="50">Add</Button>
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,238,5,0" Name="btnEditEmail" VerticalAlignment="Top" Width="50">Edit</Button>
                            <Button HorizontalAlignment="Right" Margin="0,268,6,0" Name="btnMainEmail" Width="50" Height="23" VerticalAlignment="Top">Main</Button>
                            <Button HorizontalAlignment="Right" Margin="0,297,6,0" Name="btnDeleteEmail" Width="50" Height="22.6" VerticalAlignment="Top">Delete</Button>
                            <Button HorizontalAlignment="Right" Margin="0,0,5,272" Name="btnSendEmail" Width="50" Height="22.6" VerticalAlignment="Bottom">Send</Button>
                            <ListView  Background="White" Height="139" Margin="5,0,67,100" Name="lvwAddresses" VerticalAlignment="Bottom">
                                <ListView.View >
                                    <GridView Selector.IsSelected="true" >
                                        <GridView.Columns>
                                            <GridViewColumn Width="80" Header="Name" DisplayMemberBinding="{Binding Path=AddressLink_Name}"></GridViewColumn>
                                            <GridViewColumn Width="50" Header="Type" DisplayMemberBinding="{Binding Path=Type}"></GridViewColumn>
                                            <GridViewColumn Width="150" Header="First Line" DisplayMemberBinding="{Binding Path=FirstLine}"></GridViewColumn>

                                        </GridView.Columns>
                                    </GridView>
                                </ListView.View>
                            </ListView >
                            <Label Height="21" HorizontalAlignment="Left" Margin="3,0,0,238" Name="Label37" VerticalAlignment="Bottom" Width="93">Addresses</Label>
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,0,3,209" Name="btnAddressAdd" VerticalAlignment="Bottom" Width="50">Add</Button>
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,0,3,178" Name="btnAddressEdit" VerticalAlignment="Bottom" Width="50">Edit</Button>
                            <Button Height="23" HorizontalAlignment="Right" Margin="0,0,4,147" Name="btnAddressDel" VerticalAlignment="Bottom" Width="50">Delete</Button>
                            <TextBox IsReadOnly="True" AcceptsReturn="True" TextWrapping="Wrap" Margin="4,0,0,9" Name="lblFullAddress" Height="85" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="199" BorderThickness="1" BorderBrush="Black" Background="White"></TextBox>
                            <Button Height="24" Margin="210,0,66,40" Name="btnCorrespondence" VerticalAlignment="Bottom">Correspondence Address</Button>
                            <Button Height="22.8" Margin="209,0,67,72" Name="btnInvoiceAddress" VerticalAlignment="Bottom">Invoice Address</Button>
                            <Button Height="22.8" Margin="211,0,65,10" Name="btnAddressChangeToCo" VerticalAlignment="Bottom">Change To Company Address</Button>
                        </Grid>
                    </GroupBox>
                </Grid>

            </TabItem>
            <TabItem Header="Cases" Name="tabCase" >
                <Grid Name="grdTabCase" >
                    <GroupBox Header="Case Status" Height="43" HorizontalAlignment="Left" Margin="2,0,0,0" Name="GroupBox6" VerticalAlignment="Top" Width="436">
                        <Grid>
                            <RadioButton HorizontalAlignment="Left" Margin="6,6,0,4" Name="radCaseOpen" Width="90">All Open Cases</RadioButton>
                            <RadioButton HorizontalAlignment="Left" Margin="114,6,0,4" Name="radCasePreSale" Width="58">Pre-Sale</RadioButton>
                            <RadioButton Margin="198,6,164,4" Name="radCaseInit">Initiated</RadioButton>
                            <RadioButton Margin="0,6,92,4" Name="radCaseClosed" HorizontalAlignment="Right" Width="58">Closed</RadioButton>
                            <RadioButton HorizontalAlignment="Right" Margin="0,6,-2,4" Name="radCaseAll" Width="79.5" IsChecked="True">All Cases</RadioButton>
                        </Grid>
                    </GroupBox>
                    <Button Height="23" Margin="462,6,0,0" Name="btnAddCase" VerticalAlignment="Top" HorizontalAlignment="Left" Width="101">Add New Case</Button>
                    <Button Height="22.8" HorizontalAlignment="Right" Margin="0,6,290,0" Name="btnAddPyPlan" VerticalAlignment="Top" Width="100">Add Payment Plan</Button>
                    <telerik:RadGridView  ColumnsWidthMode="Auto" Height="184" Margin="2,50,15,0"  Name="grdCases" VerticalAlignment="Top" Background="White" Width="Auto" />
                    <!--<ListView  Height="184" Margin="2,50,15,0" Name="grdCases" VerticalAlignment="Top" Background="White" Width="958">
                        <ListView.View >
                            <GridView Selector.IsSelected="true" >
                                <GridView.Columns>
                                    <GridViewColumn Width="80" Header="CaseId" DisplayMemberBinding="{Binding Path=CaseId}"></GridViewColumn>
                                    <GridViewColumn Width="50" Header="Status" DisplayMemberBinding="{Binding Path=Status}"></GridViewColumn>
                                    <GridViewColumn Width="150" Header="Product" DisplayMemberBinding="{Binding Path=Product}"></GridViewColumn>
                                    <GridViewColumn Width="50" Header="Consultant" DisplayMemberBinding="{Binding Path=Consultant}"></GridViewColumn>
                                    <GridViewColumn Width="150" Header="Caseworker" DisplayMemberBinding="{Binding Path=Caseworker}"></GridViewColumn>
                                    <GridViewColumn Width="150" Header="Coordinator" DisplayMemberBinding="{Binding Path=Coordinator}"></GridViewColumn>
                                    <GridViewColumn Width="50" Header="Candidate" DisplayMemberBinding="{Binding Path=Candidate}"></GridViewColumn>
                                    <GridViewColumn Width="150" Header="Contact" DisplayMemberBinding="{Binding Path=Contact}"></GridViewColumn>
                                    <GridViewColumn Width="150" Header="DateStatus" DisplayMemberBinding="{Binding Path=Received}"></GridViewColumn>

                                </GridView.Columns>
                            </GridView>
                        </ListView.View>
                    </ListView >-->
                    <Button Height="23" HorizontalAlignment="Left" Margin="0,259,0,0" Name="btnEditCase" VerticalAlignment="Top" Width="100">Edit Case Details</Button>
                    <Button Height="22.8" HorizontalAlignment="Left" Margin="101,259,0,0" Name="btnInbox" VerticalAlignment="Top" Width="131">Open Inbox / Sent Items</Button>
                    <Button Height="23" HorizontalAlignment="Left" Margin="233,259,0,0" Name="btnStockLetters" VerticalAlignment="Top" Width="100">Stock Letters</Button>
                    <Button Height="22.8" HorizontalAlignment="Left" Margin="334,259,0,0" Name="btnAddCaseEvent" VerticalAlignment="Top" Width="100">Add Event To Case</Button>
                    <Button Height="23" Margin="436,259,419,0" Name="btnViewCaseEvents" VerticalAlignment="Top">View Events for Case</Button>
                    <Button Height="22.8" Margin="0,259,334,0" Name="btnAddCFF" VerticalAlignment="Top" HorizontalAlignment="Right" Width="78">Add CFF</Button>
                    <Button Height="23" HorizontalAlignment="Right" Margin="0,259,229,0" Name="btnFastTrack" VerticalAlignment="Top" Width="100">Fast Track</Button>
                    <Button Height="22.8" HorizontalAlignment="Left" Margin="745,259,0,0" Name="btnCreditController" VerticalAlignment="Top" Width="75">Write Off</Button>
                    <Button HorizontalAlignment="Right" Margin="0,259.2,41,0" Name="btnRevertWriteOff" Width="103" Height="22.8" VerticalAlignment="Top">Revert WriteOff</Button>
                    <GroupBox Header="Dates" HorizontalAlignment="Left" Margin="1,287,0,163" Name="GroupBox7" Width="231">
                        <Grid Height="165" Width="217">
                            <Label Height="21" HorizontalAlignment="Left" Margin="10,7,0,0" Name="Label32" VerticalAlignment="Top" Width="64">Submitted</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="9,34,0,0" Name="Label34" VerticalAlignment="Top" Width="50">Ext Ref</Label>
                            <Label HorizontalAlignment="Left" Margin="7,60,0,0" Name="Label35" Width="77" Height="24" VerticalAlignment="Top">Doc Req Date</Label>
                            <Label Height="23.8" HorizontalAlignment="Left" Margin="7,87.2,0,0" Name="Label36" VerticalAlignment="Top" Width="50">Expiry</Label>
                            <Label Height="21" HorizontalAlignment="Left" Margin="7,116,0,0" Name="Label38" VerticalAlignment="Top" Width="64">FT Date</Label>
                            <Label Height="22" Margin="106,4,23,0" Name="lblSubmitDate" VerticalAlignment="Top" Background="White" BorderBrush="Black" BorderThickness="1"></Label>
                            <Label Height="22" Margin="106.5,31,22.5,0" Name="lblExtRef" VerticalAlignment="Top" Background="White" BorderBrush="Black" BorderThickness="1"></Label>
                            <Label Margin="106,58,24,0" Name="lblDocReqDate" Background="White" BorderBrush="Black" BorderThickness="1" Height="26" VerticalAlignment="Top"></Label>
                            <Label Height="22" Margin="106,89,24,0" Name="lblExpiry" VerticalAlignment="Top" Background="White" BorderBrush="Black" BorderThickness="1"></Label>
                            <Label Height="22" Margin="106.5,116,23.5,0" Name="lblFTDate" VerticalAlignment="Top" Background="White" BorderBrush="Black" BorderThickness="1"></Label>
                            <Label Height="20.8" HorizontalAlignment="Left" Margin="7,142.2,0,0" Name="lblWrittenOff" VerticalAlignment="Top" Width="94">Written Off Date</Label>
                            <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="24" Margin="106,143,23,0" Name="lblWriteOffDate" VerticalAlignment="Top" />
                        </Grid>
                    </GroupBox>
                    <Button Height="23" Margin="-1,0,0,134" Name="MFB1" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="112" Visibility="Hidden" Tag="1"></Button>
                    <Button Height="22.8" HorizontalAlignment="Left" Visibility="Hidden" Margin="119,0,0,134" Name="MFB2" VerticalAlignment="Bottom" Width="112" Tag="2"></Button>
                    <Button Height="23" Margin="-1,0,0,102" Name="MFB3" Visibility="Hidden" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="112" Tag="3" />
                    <Button Height="22.8" HorizontalAlignment="Left" Margin="119,0,0,102" Visibility="Hidden" Name="MFB4" VerticalAlignment="Bottom" Width="112" Tag="4"/>
                    <Button Height="23" Margin="-1,0,0,68" Name="MFB5" VerticalAlignment="Bottom" Visibility="Hidden" HorizontalAlignment="Left" Width="112" Tag="5"/>
                    <Button Height="22.8" HorizontalAlignment="Left" Margin="119,0,0,68" Name="MFB6" Visibility="Hidden" VerticalAlignment="Bottom" Width="112" Tag="6" />
                    <Button Height="23" Margin="-1,0,0,35" Name="MFB7" VerticalAlignment="Bottom" Visibility="Hidden" HorizontalAlignment="Left" Width="112" Tag="7"/>
                    <Button Height="22.8" HorizontalAlignment="Left" Margin="119,0,0,35" Name="MFB8" VerticalAlignment="Bottom" Visibility="Hidden" Width="112" Tag="8"/>
                    <Button Height="23" HorizontalAlignment="Left" Margin="0,0,0,2" Name="MFB9" VerticalAlignment="Bottom" Visibility="Hidden" Width="112" Tag="9"/>
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Margin="306,291,0,0" Name="lblCandidateID2" Height="24"  HorizontalAlignment="Left" VerticalAlignment="Top" Width="118" />
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Margin="0,291,362,0" Name="lblCandidateName2" Height="24" VerticalAlignment="Top" Width="183" HorizontalAlignment="Right" />
                    <Label HorizontalAlignment="Left" Margin="236,291,0,0" Name="Label48" Width="64" Height="21" VerticalAlignment="Top">Candidate</Label>
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="24" HorizontalAlignment="Left" Margin="664,291,0,0" Name="lblContactId" VerticalAlignment="Top" Width="118" />
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="24" HorizontalAlignment="Right" Margin="0,291,2,0" Name="lblContactName" VerticalAlignment="Top" Width="183" />
                    <Label Height="21" Margin="610,292,0,0" Name="lblCon1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="49">Contact</Label>
                    <ComboBox Height="23" HorizontalAlignment="Left" Margin="306,0,0,295" Name="cmbEmailTo" VerticalAlignment="Bottom" Width="120" BorderBrush="Black" >
                            <ComboBoxItem>Contact</ComboBoxItem>
                            <ComboBoxItem>Candidate</ComboBoxItem>
                            <ComboBoxItem>Both</ComboBoxItem>
                            <ComboBoxItem>Blank</ComboBoxItem>
                    </ComboBox>
                    <Button Height="23" Margin="0,0,454,295" Name="btnSend" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="84">Send Mail</Button>
                    <TabControl Height="289" Margin="237,0,0,0" Name="TabControl2" VerticalAlignment="Bottom" Background="Gray">
                        <TabItem Header="Details" Name="tabDetails">
                            <Grid>
                                <GroupBox Header="Case Finance (" HorizontalAlignment="Left" Margin="6,6,0,57" Name="GroupBox9" Width="311">
                                    <Grid>
                                        <Label Height="21" HorizontalAlignment="Left" Margin="2,17,0,0" Name="Label52" VerticalAlignment="Top" Width="50">Quoted</Label>
                                        <Label Height="21" HorizontalAlignment="Left" Margin="2,47,0,0" Name="Label53" VerticalAlignment="Top" Width="50">Invoiced</Label>
                                        <Label HorizontalAlignment="Left" Margin="3,76,0,72" Name="Label54" Width="102">Payments ( AED )</Label>
                                        <Label Height="25.6" HorizontalAlignment="Left" Margin="3,0,0,47" Name="Label55" VerticalAlignment="Bottom" Width="105">Balance( AED )</Label>
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="25" Margin="114,16,101,0" Name="lblQuoteNet" VerticalAlignment="Top" />
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="25" Margin="114,46,101,0" Name="lblInvoiceNet" VerticalAlignment="Top" />
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="24" Margin="114,0,5,46" Name="lblBalance" VerticalAlignment="Bottom" />
                                        <Button Height="23" Margin="106,0,93,9" Name="btnViewCaseFinance" VerticalAlignment="Bottom">View Details</Button>
                                        <Label Height="21" Margin="134,-2,136,0" Name="Label60" VerticalAlignment="Top">Net</Label>
                                        <Label Height="21" HorizontalAlignment="Right" Margin="0,-2,36,0" Name="Label61" VerticalAlignment="Top" Width="37">Gross</Label>
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="25" HorizontalAlignment="Right" Margin="0,15,3,0" Name="lblQuoteGross" VerticalAlignment="Top" Width="84" />
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="25" HorizontalAlignment="Right" Margin="0,45,3,0" Name="lblInvoiceGross" VerticalAlignment="Top" Width="84" />
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Margin="114,76,4,75" Name="lblPayments" />
                                    </Grid>
                                </GroupBox>
                                <GroupBox Header="Case Status" Margin="326,7,174,57" Name="grpStatus">
                                    <Grid Name="grdStatus">
                                        <Label Height="21" HorizontalAlignment="Left" Margin="3,45,0,0" Name="Labe2" VerticalAlignment="Top" Width="90">Date status set</Label>
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="22" Margin="80,14,135,0" Name="Label68" VerticalAlignment="Top" />
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="22" Margin="80,42,135,0" Name="Label69" VerticalAlignment="Top" />
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="24" Margin="6,13,3,0" Name="lblCaseStatus" VerticalAlignment="Top" />
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="24" Margin="99,44,3,0" Name="lblDateStatus" VerticalAlignment="Top" />
                                        <Button Margin="0,76" Name="btnStage1" HorizontalAlignment="Left" Width="100" Tag="1" Visibility="Hidden" FontSize="8">
                                            <TextBlock TextWrapping="Wrap"></TextBlock>
                                        </Button>
                                        <Button HorizontalAlignment="Right" Margin="0,76,3,76" Name="btnStage4" Width="100" Tag="4" Visibility="Hidden" FontSize="8">
                                            <TextBlock TextWrapping="Wrap"></TextBlock>
                                        </Button>
                                        <Button Height="23" Margin="0,0,0,42" Name="btnStage2" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="100" Tag="2" Visibility="Hidden" FontSize="8">
                                            <TextBlock TextWrapping="Wrap"></TextBlock>
                                        </Button>
                                        
                                        <Button Height="22.8" HorizontalAlignment="Right" Margin="0,0,3,42" Name="btnStage5" VerticalAlignment="Bottom" Width="100" Tag="5" Visibility="Hidden" FontSize="8">
                                        <TextBlock TextWrapping="Wrap"></TextBlock>
                                        </Button>

                                        <Button Margin="0,0,0,9" Name="btnStage3" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="100" Tag="3" Visibility="Hidden" FontSize="8">
                                        <TextBlock TextWrapping="Wrap"></TextBlock>
                                        </Button>

                                        <Button HorizontalAlignment="Right" Margin="0,0,3,9" Name="btnStage6" Width="100" Height="22.8" VerticalAlignment="Bottom" Tag="6" Visibility="Hidden" FontSize="8">
                                        <TextBlock TextWrapping="Wrap"></TextBlock>
                                        </Button>

                                    </Grid>
                                </GroupBox>
                                <GroupBox Header="Documents" Margin="0,7,4,57" Name="GroupBox11" HorizontalAlignment="Right" Width="164">
                                    <Grid>
                                        <Label Height="32" HorizontalAlignment="Left" Margin="0,43,0,0" Name="lblNoDocOut" VerticalAlignment="Top" Width="30" BorderThickness="0">0</Label>
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="22" Margin="80,14,135,0" Name="Label66" VerticalAlignment="Top" />
                                        <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="22" Margin="80,42,135,0" Name="Label67" VerticalAlignment="Top" />
                                        <Label Background="Gray" BorderBrush="Black" BorderThickness="0" Height="32.446" Margin="36,13,6,0" Name="lblDocumentRequirements" VerticalAlignment="Top" FlowDirection="LeftToRight" VerticalContentAlignment="Center">Document Required</Label>
                                        <Label Background="Gray" BorderBrush="Black" BorderThickness="0" Height="28" Margin="36,42,23,0" Name="lblOutStanding" VerticalAlignment="Top" VerticalContentAlignment="Center">Outstanding</Label>
                                        <Button Height="23" Margin="18,0,23,9" Name="btnDocStore" VerticalAlignment="Bottom" Visibility="Visible">View Details</Button>
                                        <Label BorderThickness="0" Height="32" HorizontalAlignment="Left" Margin="0,15,0,0" Name="lblNoDocReq" VerticalAlignment="Top" Width="30">0</Label>
                                        <Label BorderThickness="0" HorizontalAlignment="Left" Margin="1,71,0,83" Name="lblNoDocStore" Width="29" Height="32">0</Label>
                                        <Label Background="Gray" BorderBrush="Black" BorderThickness="0" Margin="36,70,9,72" Name="lblDocumentsInStore" VerticalContentAlignment="Center">Documents in Store</Label>
                                    </Grid>
                                </GroupBox>
                            </Grid>
                        </TabItem>
                        <TabItem Header="Events" Name="tabEvents">
                            <Grid >
                                <ListView  Name="lvwEventsTab" Margin="4,9,257,29" Background="White" >
                                    <ListView.View >
                                        <GridView Selector.IsSelected="true" >
                                            <GridView.Columns>
                                                <GridViewColumn Width="80" Header="Date" DisplayMemberBinding="{Binding Path=EventDT}"></GridViewColumn>
                                                <GridViewColumn Width="80" Header="Description" DisplayMemberBinding="{Binding Path=Event_Description}"></GridViewColumn>
                                                <GridViewColumn Width="90" Header="Consultant" DisplayMemberBinding="{Binding Path=con_name}"></GridViewColumn>
                                                <GridViewColumn Width="80" Header="Status" DisplayMemberBinding="{Binding Path=Category}"></GridViewColumn>
                                                <GridViewColumn Width="50" Header="For" DisplayMemberBinding="{Binding Path=LinkFor}"></GridViewColumn>

                                            </GridView.Columns>
                                        </GridView>
                                    </ListView.View>
                                </ListView>
                                <Label HorizontalAlignment="Right" Margin="0,9.4,11,28.4" Name="lblEventTab" Width="232" Background="Wheat" BorderBrush="Black" BorderThickness="1"></Label>
                            </Grid>

                        </TabItem>
                        <TabItem Header="Key Dates" Name="tabKeyDates" >
                            <Grid >
                                <ListView  Margin="6,6,160,31.8" Name="lvwKeyDates" Background="White" >
                                    <ListView.View >
                                        <GridView Selector.IsSelected="true" >
                                            <GridView.Columns>
                                                <GridViewColumn Width="150" Header="Status" DisplayMemberBinding="{Binding Path=Sender}"></GridViewColumn>
                                                <GridViewColumn Width="80" Header="Date" DisplayMemberBinding="{Binding Path=Received}"></GridViewColumn>
                                                <GridViewColumn Width="150" Header="Working Days" DisplayMemberBinding="{Binding Path=Received}"></GridViewColumn>

                                            </GridView.Columns>
                                        </GridView>
                                    </ListView.View>
                                </ListView>
                                <Button Height="22.8" HorizontalAlignment="Right" Margin="0,6,61,0" Name="btnFileAudit" VerticalAlignment="Top" Width="78"></Button>
                            </Grid>

                        </TabItem>
                    </TabControl>
                    <Button Height="22.8" HorizontalAlignment="Right" Margin="0,6,171,0" Name="btnPdf" VerticalAlignment="Top" Width="100">PDF Doc</Button>
                </Grid>
            </TabItem>
            <TabItem Header="Event" Name="tabEvent" >
                <Grid >
                    <GroupBox Header="Case Status" Height="43" Margin="2,-3,467,0" Name="GroupBox8" VerticalAlignment="Top">
                        <Grid>
                            <RadioButton HorizontalAlignment="Left" Margin="7,6,0,4" Name="radEventCompany" Width="69">Company</RadioButton>
                            <RadioButton HorizontalAlignment="Left" Margin="85,6,0,4" Name="radEventPerson" Width="58">Person</RadioButton>
                            <RadioButton Margin="156,6,0,4" Name="radEventCase" HorizontalAlignment="Left" Width="49">Case</RadioButton>
                            <RadioButton Margin="215,6,0,4" Name="radEventCombined" HorizontalAlignment="Left" Width="102">Case Combined</RadioButton>
                            <RadioButton HorizontalAlignment="Right" Margin="0,6,83,4" Name="radEventConsultant" Width="79.5">Consultant</RadioButton>
                            <RadioButton HorizontalAlignment="Right" Margin="0,5,28,5" Name="radEventAll" Width="49">All</RadioButton>
                        </Grid>
                    </GroupBox>
                    <Label Height="21" HorizontalAlignment="Right" Margin="0,6,208,0" Name="Label39" VerticalAlignment="Top" Width="64">Booked</Label>
                    <Label Height="21" HorizontalAlignment="Right" Margin="0,33,213,0" Name="Label40" VerticalAlignment="Top" Width="59">Scheduled</Label>
                    <Label Height="27.6" HorizontalAlignment="Right" Margin="0,6,378,0" Name="Label41" VerticalAlignment="Top" Width="77">Event Id</Label>
                    <Label Height="23.8" HorizontalAlignment="Right" Margin="0,32,393,0" Name="Label42" VerticalAlignment="Top" Width="61">Linked To</Label>
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="27" HorizontalAlignment="Right" Margin="0,3,115,0" Name="lblBooked1" VerticalAlignment="Top" Width="90" />
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="27" HorizontalAlignment="Right" Margin="0,30,115,0" Name="lblScheduled1" VerticalAlignment="Top" Width="90" />
                    <TextBox IsReadOnly="True" Background="White" BorderBrush="Black" BorderThickness="1" Height="22" HorizontalAlignment="Right" Margin="0,4,278,0" Name="lblEventId" VerticalAlignment="Top" Width="89" />
                    <TextBox IsReadOnly="True" Background="White" BorderBrush="Black" BorderThickness="1" Height="22" HorizontalAlignment="Right" Margin="0,32,279,0" Name="lblLinkedTo" VerticalAlignment="Top" Width="89" />
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="27" HorizontalAlignment="Right" Margin="0,3,7,0" Name="lblBooked2" VerticalAlignment="Top" Width="102"/>
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="27" HorizontalAlignment="Right" Margin="0,31,7,0" Name="lblScheduled2" VerticalAlignment="Top" Width="102" />
                    <Label Height="21" HorizontalAlignment="Right" Margin="0,60,211,0" Name="Label58" VerticalAlignment="Top" Width="62">Completed</Label>
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="27" Margin="0,57,115,0" Name="lblCompleted1" VerticalAlignment="Top" HorizontalAlignment="Right" Width="90" />
                    <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="27" HorizontalAlignment="Right" Margin="0,58,7,0" Name="lblCompleted2" VerticalAlignment="Top" Width="102" />
                    <Button Height="22.8" Margin="0,85,58.5,0" Name="btnPrintAll" VerticalAlignment="Top" HorizontalAlignment="Right" Width="95">Print All Events</Button>
                    <Button Height="23" Margin="0,85,253.5,0" Name="btnPrint" VerticalAlignment="Top" HorizontalAlignment="Right" Width="111">Print Selected Event</Button>
                    <Button Height="22.8" Margin="0,85,159.5,0" Name="btnEmailEvents" VerticalAlignment="Top" HorizontalAlignment="Right" Width="88">Save to H:</Button>
                    <Label Height="27.6" HorizontalAlignment="Left" Margin="8,60,0,0" Name="lblEventView" VerticalAlignment="Top" Width="88">View</Label>
                    <ComboBox BorderBrush="Black" Height="23" HorizontalAlignment="Left" Margin="110,60,0,0" Name="drpEventView" VerticalAlignment="Top" Width="249" />
                    <Button Height="23" Margin="386,59,473,0" Name="btnAddEventToCase" VerticalAlignment="Top">Add Event to Case</Button>
                    <ListView  Margin="8,114,404,6" Name="lvwEvents" Background="White">
                        <ListView.View >
                            <GridView Selector.IsSelected="true" >
                                <GridView.Columns>
                                    <GridViewColumn  Width="Auto" Header="Date / Time" DisplayMemberBinding="{Binding Path=EventDT}"></GridViewColumn>
                                    <GridViewColumn Width="Auto" Header="Type" DisplayMemberBinding="{Binding Path=Event_Description}"></GridViewColumn>
                                    <GridViewColumn Width="Auto" Header="Consultant" DisplayMemberBinding="{Binding Path=con_name}"></GridViewColumn>
                                    <GridViewColumn Width="Auto" Header="Status" DisplayMemberBinding="{Binding Path=Category}"></GridViewColumn>
                                    <GridViewColumn Width="Auto" Header="For" DisplayMemberBinding="{Binding Path=LinkFor}"></GridViewColumn>

                                </GridView.Columns>
                            </GridView>
                        </ListView.View>
                    </ListView>
                    <Label Height="27" HorizontalAlignment="Left" Margin="15,86,0,0" Name="lblViewingEvent" VerticalAlignment="Top" Width="254">Viewing Events for:</Label>
                    <TextBox IsReadOnly="True" HorizontalAlignment="Right" Margin="0,114,6,5.762"  Name="lblMessage" Width="392" BorderBrush="Black" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap">
                        <TextBox.BindingGroup>
                            <BindingGroup Name="{x:Null}" NotifyOnValidationError="False" />
                        </TextBox.BindingGroup>
                    </TextBox>
                </Grid>

            </TabItem>
            <TabItem Header="Account" Name="tabAccount">
                <Grid >
                    <GroupBox Header="Case Summary" Margin="6,6,200,274.8" Name="GroupBox10">
                        <Grid> 
                            <ListView  Margin="6,6,6,26.8" Name="grdCaseSummary" Background="White" >
                                <ListView.View >
                                    <GridView Selector.IsSelected="true" >
                                        <GridView.Columns>
                                            <GridViewColumn  Width="Auto" Header="CaseID" DisplayMemberBinding="{Binding Path=Case_ID}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Product Name" DisplayMemberBinding="{Binding Path=Product_Name}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Case Stage Title" DisplayMemberBinding="{Binding Path=CaseStage_Title}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="NetInvoice" DisplayMemberBinding="{Binding Path=NetInv}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="IncomeInv" DisplayMemberBinding="{Binding Path=IncomeInv}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="GrossInv" DisplayMemberBinding="{Binding Path=GrossInv}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Paid" DisplayMemberBinding="{Binding Path=Paid}"></GridViewColumn>
                                            <GridViewColumn Width="Auto"  Header="Balance" DisplayMemberBinding="{Binding Path=Balance}"></GridViewColumn>

                                        </GridView.Columns>
                                    </GridView>
                                </ListView.View>
                            </ListView >
                            <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="22" Margin="0,0,271,-1" Name="lblIncome1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="90" />
                            <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="22" Margin="0,0,94,-1" Name="lblPaid1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="90" />
                            <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="22" Margin="304,0,359,-1" Name="lblNet1" VerticalAlignment="Bottom" />
                            <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="22" Margin="0,0,183,-1" Name="lblGross1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="89" />
                            <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="22" Margin="0,0,5,-1" Name="lblBalance1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="90" />
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="Invoice Summary" Margin="6,0,200,3" Name="GroupBox12" Height="270" VerticalAlignment="Bottom">
                        <Grid>
                            <ListView  Margin="6" Name="grdInvoiceSummary" Background="White" >
                                <ListView.View >
                                    <GridView Selector.IsSelected="true" >
                                        <GridView.Columns>
                                            <GridViewColumn Width="Auto" Header="Invoice Id" DisplayMemberBinding="{Binding Path=Invoice_ID}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Case Id" DisplayMemberBinding="{Binding Path=CaseID}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Invoice No" DisplayMemberBinding="{Binding Path=InvNo}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Invoice Date" DisplayMemberBinding="{Binding Path=InvDate}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Due Date" DisplayMemberBinding="{Binding Path=DueDate}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Net" DisplayMemberBinding="{Binding Path=Net}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Income" DisplayMemberBinding="{Binding Path=Income}"></GridViewColumn>
                                            <GridViewColumn Width="Auto" Header="Gross" DisplayMemberBinding="{Binding Path=Gross}"></GridViewColumn>

                                        </GridView.Columns>
                                    </GridView>
                                </ListView.View>
                            </ListView>
                            <GroupBox Header="Invoice" Height="105" HorizontalAlignment="Right" Margin="0,0,-200,6" Name="GroupBox14" VerticalAlignment="Bottom" Width="188">
                                <Grid>
                                    <ComboBox BorderBrush="Black" Height="23" Margin="10,15,12,0" Name="drpMethod" VerticalAlignment="Top">
                                        <ComboBoxItem>Print</ComboBoxItem>
                                        <ComboBoxItem>Email</ComboBoxItem>
                                        <ComboBoxItem>H: Drive</ComboBoxItem>
                                    </ComboBox>
                                    <Button Height="22.8" Margin="8,0,56,9" Name="btnok" VerticalAlignment="Bottom">Ok</Button>
                                </Grid>
                            </GroupBox>
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="Create Statement" HorizontalAlignment="Right" Margin="0,0,6,126" Name="GroupBox13" Width="188" Height="505" VerticalAlignment="Bottom">
                        <Grid>
                            <Label Background="White" BorderBrush="Black" BorderThickness="1" Height="24" Margin="8,27,6,0" Name="lblBalanceLarge" VerticalAlignment="Top" />
                            <Label Height="21" Margin="5,3,64,0" Name="Label44" VerticalAlignment="Top">Account Balance</Label>
                            <GroupBox Header="Date Selection" Margin="8,55,6,175.6" Name="grpDateSelect">
                                <Grid>
                                    <RadioButton Margin="12,11,48,211.2" Tag="1" Name="radAccAll">All</RadioButton>
                                    <RadioButton Height="13.8" Margin="12,30,19,0" Tag="2"  Name="radAccFrom" VerticalAlignment="Top">From Date to Today</RadioButton>
                                    <RadioButton Height="13.8" Margin="13,50,47,0" Tag="3" Name="radAccThisMonth" VerticalAlignment="Top">Current Month</RadioButton>
                                    <RadioButton Height="13.8" Margin="14,70,47,0" Tag="4" Name="radAccLastMonth" VerticalAlignment="Top">Last Month</RadioButton>
                                    <RadioButton Height="13.8" Margin="14,90,53,0" Tag="5"  Name="radAccRange" VerticalAlignment="Top">Date Range</RadioButton>
                                    <Label Height="21" Margin="14,0,29,96" Name="lblAccStart" VerticalAlignment="Bottom">Start Date</Label>
                                    <Label Height="21" Margin="15,0,28,38" Name="lblAccEnd" VerticalAlignment="Bottom">End Date</Label>
                                    <!--<TextBox BorderBrush="Black" Height="20" Margin="18,0,29,70" Name="txtAccStart" VerticalAlignment="Bottom" />-->
                                    <my:DatePicker BorderBrush="Black" Height="20" Margin="18,0,29,70" Name="txtAccStart" VerticalAlignment="Bottom" xmlns:my="http://schemas.microsoft.com/wpf/2008/toolkit" />
                                    <!--<TextBox BorderBrush="Black" Height="20" Margin="19,0,28,12" Name="txtAccEnd" VerticalAlignment="Bottom" />-->
                                    <my:DatePicker BorderBrush="Black" Height="20" Margin="19,0,28,12" Name="txtAccEnd" VerticalAlignment="Bottom" xmlns:my="http://schemas.microsoft.com/wpf/2008/toolkit" />
                                </Grid>
                            </GroupBox>
                            <Label Height="21" Margin="5,0,64,142.8" Name="Label45" VerticalAlignment="Bottom">Output To</Label>
                            <ComboBox BorderBrush="Black" Height="23" Margin="10,0,12,113" Name="drpOutputTo" VerticalAlignment="Bottom">
                                <ComboBoxItem>Print</ComboBoxItem>
                                <ComboBoxItem>Screen</ComboBoxItem>
                                <ComboBoxItem>E-Mail as Word</ComboBoxItem>
                                <ComboBoxItem>File as Word</ComboBoxItem>
                                <ComboBoxItem>File as Excel</ComboBoxItem>
                            </ComboBox>
                            <CheckBox Height="16" Margin="10,0,46,78" Name="chkSubsidiary" VerticalAlignment="Bottom">Include Subsidiaries</CheckBox>
                            <Button Height="22.8" Margin="10,0,54,42" Name="btnCreateStatement" VerticalAlignment="Bottom">Create Statement</Button>
                            <Button Height="22.8" Margin="10,0,54,7" Name="btnFundsOfStatement" VerticalAlignment="Bottom">Funds OS Statement</Button>
                        </Grid>
                    </GroupBox>
                </Grid>
            </TabItem>
            <TabItem Header="Documents" Name="tabDocuments" >
                <Grid Height="625" MaxHeight="625" MaxWidth="975" Width="933.75">
                    <GroupBox Header="Requirements" Margin="5,3,12,202" Name="grpReq">
                        <Grid>
                            <Label Height="22.8" HorizontalAlignment="Left" Margin="341,0,0,3" Name="Label30" VerticalAlignment="Bottom" Width="49">Type</Label>
                            <ComboBox BorderBrush="Black" Height="21" Margin="415,0,327,4" Name="drpDocType" VerticalAlignment="Bottom" />
                            <Label Height="22.8" HorizontalAlignment="Left" Margin="16,0,0,3" Name="Label31" VerticalAlignment="Bottom" Width="51">Name</Label>
                            <TextBox BorderBrush="Black" Height="20" HorizontalAlignment="Right" Margin="0,0,588,6" Name="txtDocName" VerticalAlignment="Bottom" Width="234" />
                            <Button ContentStringFormat="" Height="22.8" HorizontalAlignment="Right" Margin="0,0,129,3" Name="btnAdd" VerticalAlignment="Bottom" Width="136">Add Requirement</Button>
                            <Button Height="21" HorizontalAlignment="Right" Margin="0,5,18,0" Name="Button1" VerticalAlignment="Top" Width="105" Visibility="Hidden">Close</Button>
                            <Button Height="21" HorizontalAlignment="Right" Margin="0,223,6,0" Name="btnDefaults" VerticalAlignment="Top" Width="117">Load Defaults</Button>
                            <Button Height="34" HorizontalAlignment="Right" Margin="0,156,6,0" Name="btnAddComment" VerticalAlignment="Top" Width="117">Add Document Review Comment</Button>
                            <Button Height="21" HorizontalAlignment="Right" Margin="0,196,6,0" Name="btnReceived" VerticalAlignment="Top" Width="117">Mark as Received</Button>
                            <Button HorizontalAlignment="Right" Margin="0,0,6,152.5" Name="btnDelete" Width="117" Height="21.25" VerticalAlignment="Bottom">Delete</Button>
                            <ComboBox BorderBrush="Black" Height="21" HorizontalAlignment="Right" Margin="0,129,6,0" Name="cmbDocComments" VerticalAlignment="Top" Width="117" />
                            <ListView Margin="1,5,175,49" Name="lvwRequired">
                                <ListView.View>
                                    <GridView Selector.IsSelected="True">
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocReq_Name}" Width="150">Document</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocReqType_Name}" Width="150">Type</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocReq_DTEntered}" Width="150">Date Added</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=Rec}" Width="150">Status</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocReq_DTReceived}" Width="150">Date Received</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocReq_RecBy}" Width="150">Received by</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocComment_Msg}" Width="150">Comments</GridViewColumn>
                                    </GridView>
                                </ListView.View>
                            </ListView>
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="Documents Stored" Height="184" Margin="5,0,12,12" Name="GroupBox5" VerticalAlignment="Bottom">
                        <Grid>
                            <Button ContentStringFormat="" Height="22.8" HorizontalAlignment="Left" Margin="0,0,0,-2" Name="btnLoad" VerticalAlignment="Bottom" Width="175">Load Documents to Store</Button>
                            <ListView Margin="0,1,0,26" Name="lvwStored">
                                <ListView.View>
                                    <GridView Selector.IsSelected="True">
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocStore_ID}" Width="150">ID</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocStore_Description}" Width="150">Store Name</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocStore_Type}" Width="150">Type</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=Date_Entered}" Width="150">Date</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=DocStore_EnteredBy}" Width="150">Created By</GridViewColumn>
                                        <GridViewColumn DisplayMemberBinding="{Binding Path=Doc_ID}" Width="150">No of Docs</GridViewColumn>
                                    </GridView>
                                </ListView.View>
                            </ListView>
                            <Button ContentStringFormat="" Height="22.8" HorizontalAlignment="Left" Margin="205,0,0,-2.5" Name="btnPrintAllDocs" VerticalAlignment="Bottom" Width="175">Print All Documents</Button>
                            <Button ContentStringFormat="" Height="22.8" Margin="415,0,314.75,-3.75" Name="btnPrintSelDocs" VerticalAlignment="Bottom">Print Selected Documents</Button>
                        </Grid>
                    </GroupBox>
                </Grid>
            </TabItem>
        </TabControl>
        <Label Height="24" HorizontalAlignment="Left" Margin="156,30,0,0" Name="lblCreditController" VerticalAlignment="Top" Width="58"></Label>
    </Grid>
</UserControl>
